// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_PROD_PICKING_MATERIAL_ITEM
// * CreateDate    : 2012/4/10 17:13:02
// * Creater       : CodeSmith
// * LastChangeDate: 2012/4/10 17:13:02
// * LastChanger   : 2012/4/10 17:13:02
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class ProdPickingMaterialItemEntity : EntityBase
    {
        public ProdPickingMaterialItemTable TableSchema
        {
            get
            {
                return ProdPickingMaterialItemTable.Current;
            }
        }

        public ProdPickingMaterialItemEntity()
        {

        }

        public ProdPickingMaterialItemEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.PickingMaterialItemId = Convert.ToString(CommonFunctions.ToObject(dr["PICKING_MATERIAL_ITEM_ID"]));
            this.PickingMaterialId = Convert.ToString(CommonFunctions.ToObject(dr["PICKING_MATERIAL_ID"]));
            this.PlanOrderItemId = Convert.ToString(CommonFunctions.ToObject(dr["PLAN_ORDER_ITEM_ID"]));
            this.MaterialId = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_ID"]));
            this.ProductTechnicId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TECHNIC_ID"]));
            this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
            this.UnitQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["UNIT_QTY"]));
            this.NetSize = Convert.ToString(CommonFunctions.ToObject(dr["NET_SIZE"]));
            this.GrossSize = Convert.ToString(CommonFunctions.ToObject(dr["GROSS_SIZE"]));
            this.RequiredTotalWeight = Convert.ToDecimal(CommonFunctions.ToObject(dr["REQUIRED_TOTAL_WEIGHT"]));
            this.ActualTotalWeight = Convert.ToDecimal(CommonFunctions.ToObject(dr["ACTUAL_TOTAL_WEIGHT"]));
            this.UnitWeight = Convert.ToDecimal(CommonFunctions.ToObject(dr["UNIT_WEIGHT"]));
            this.TotalWeight = Convert.ToDecimal(CommonFunctions.ToObject(dr["TOTAL_WEIGHT"]));
            this.PickingType = Convert.ToString(CommonFunctions.ToObject(dr["PICKING_TYPE"]));
            this.PickingModel = Convert.ToDecimal(CommonFunctions.ToObject(dr["PICKING_MODEL"]));
            this.Unit = Convert.ToString(CommonFunctions.ToObject(dr["UNIT"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.PlanDeliveryDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["PLAN_DELIVERY_DATE"]));
        }

        public ProdPickingMaterialItemEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.PickingMaterialItemId = Convert.ToString(CommonFunctions.ToObject(dr["PICKING_MATERIAL_ITEM_ID"]));
            this.PickingMaterialId = Convert.ToString(CommonFunctions.ToObject(dr["PICKING_MATERIAL_ID"]));
            this.PlanOrderItemId = Convert.ToString(CommonFunctions.ToObject(dr["PLAN_ORDER_ITEM_ID"]));
            this.MaterialId = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_ID"]));
            this.ProductTechnicId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TECHNIC_ID"]));
            this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
            this.UnitQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["UNIT_QTY"]));
            this.NetSize = Convert.ToString(CommonFunctions.ToObject(dr["NET_SIZE"]));
            this.GrossSize = Convert.ToString(CommonFunctions.ToObject(dr["GROSS_SIZE"]));
            this.RequiredTotalWeight = Convert.ToDecimal(CommonFunctions.ToObject(dr["REQUIRED_TOTAL_WEIGHT"]));
            this.ActualTotalWeight = Convert.ToDecimal(CommonFunctions.ToObject(dr["ACTUAL_TOTAL_WEIGHT"]));
            this.UnitWeight = Convert.ToDecimal(CommonFunctions.ToObject(dr["UNIT_WEIGHT"]));
            this.TotalWeight = Convert.ToDecimal(CommonFunctions.ToObject(dr["TOTAL_WEIGHT"]));
            this.PickingType = Convert.ToString(CommonFunctions.ToObject(dr["PICKING_TYPE"]));
            this.PickingModel = Convert.ToDecimal(CommonFunctions.ToObject(dr["PICKING_MODEL"]));
            this.Unit = Convert.ToString(CommonFunctions.ToObject(dr["UNIT"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.PlanDeliveryDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["PLAN_DELIVERY_DATE"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return ProdPickingMaterialItemTable.Current;
            }
        }

        #region Perporty List
        public string PickingMaterialItemId
        {
            get { return Convert.ToString(GetData(ProdPickingMaterialItemTable.C_PICKING_MATERIAL_ITEM_ID)); }
            set { SetData(ProdPickingMaterialItemTable.C_PICKING_MATERIAL_ITEM_ID, value); }
        }

        public string PickingMaterialId
        {
            get { return Convert.ToString(GetData(ProdPickingMaterialItemTable.C_PICKING_MATERIAL_ID)); }
            set { SetData(ProdPickingMaterialItemTable.C_PICKING_MATERIAL_ID, value); }
        }

        public string PlanOrderItemId
        {
            get { return Convert.ToString(GetData(ProdPickingMaterialItemTable.C_PLAN_ORDER_ITEM_ID)); }
            set { SetData(ProdPickingMaterialItemTable.C_PLAN_ORDER_ITEM_ID, value); }
        }

        public string MaterialId
        {
            get { return Convert.ToString(GetData(ProdPickingMaterialItemTable.C_MATERIAL_ID)); }
            set { SetData(ProdPickingMaterialItemTable.C_MATERIAL_ID, value); }
        }

        public string ProductTechnicId
        {
            get { return Convert.ToString(GetData(ProdPickingMaterialItemTable.C_PRODUCT_TECHNIC_ID)); }
            set { SetData(ProdPickingMaterialItemTable.C_PRODUCT_TECHNIC_ID, value); }
        }

        public decimal Qty
        {
            get { return Convert.ToDecimal(GetData(ProdPickingMaterialItemTable.C_QTY)); }
            set { SetData(ProdPickingMaterialItemTable.C_QTY, value); }
        }

        public decimal UnitQty
        {
            get { return Convert.ToDecimal(GetData(ProdPickingMaterialItemTable.C_UNIT_QTY)); }
            set { SetData(ProdPickingMaterialItemTable.C_UNIT_QTY, value); }
        }

        public string NetSize
        {
            get { return Convert.ToString(GetData(ProdPickingMaterialItemTable.C_NET_SIZE)); }
            set { SetData(ProdPickingMaterialItemTable.C_NET_SIZE, value); }
        }

        public string GrossSize
        {
            get { return Convert.ToString(GetData(ProdPickingMaterialItemTable.C_GROSS_SIZE)); }
            set { SetData(ProdPickingMaterialItemTable.C_GROSS_SIZE, value); }
        }

        public decimal RequiredTotalWeight
        {
            get { return Convert.ToDecimal(GetData(ProdPickingMaterialItemTable.C_REQUIRED_TOTAL_WEIGHT)); }
            set { SetData(ProdPickingMaterialItemTable.C_REQUIRED_TOTAL_WEIGHT, value); }
        }

        public decimal ActualTotalWeight
        {
            get { return Convert.ToDecimal(GetData(ProdPickingMaterialItemTable.C_ACTUAL_TOTAL_WEIGHT)); }
            set { SetData(ProdPickingMaterialItemTable.C_ACTUAL_TOTAL_WEIGHT, value); }
        }

        public decimal UnitWeight
        {
            get { return Convert.ToDecimal(GetData(ProdPickingMaterialItemTable.C_UNIT_WEIGHT)); }
            set { SetData(ProdPickingMaterialItemTable.C_UNIT_WEIGHT, value); }
        }

        public decimal TotalWeight
        {
            get { return Convert.ToDecimal(GetData(ProdPickingMaterialItemTable.C_TOTAL_WEIGHT)); }
            set { SetData(ProdPickingMaterialItemTable.C_TOTAL_WEIGHT, value); }
        }

        public string PickingType
        {
            get { return Convert.ToString(GetData(ProdPickingMaterialItemTable.C_PICKING_TYPE)); }
            set { SetData(ProdPickingMaterialItemTable.C_PICKING_TYPE, value); }
        }

        public decimal PickingModel
        {
            get { return Convert.ToDecimal(GetData(ProdPickingMaterialItemTable.C_PICKING_MODEL)); }
            set { SetData(ProdPickingMaterialItemTable.C_PICKING_MODEL, value); }
        }

        public string Unit
        {
            get { return Convert.ToString(GetData(ProdPickingMaterialItemTable.C_UNIT)); }
            set { SetData(ProdPickingMaterialItemTable.C_UNIT, value); }
        }

        public string Status
        {
            get { return Convert.ToString(GetData(ProdPickingMaterialItemTable.C_STATUS)); }
            set { SetData(ProdPickingMaterialItemTable.C_STATUS, value); }
        }

        public DateTime PlanDeliveryDate
        {
            get { return Convert.ToDateTime(GetData(ProdPickingMaterialItemTable.C_PLAN_DELIVERY_DATE)); }
            set { SetData(ProdPickingMaterialItemTable.C_PLAN_DELIVERY_DATE, value); }
        }

        #endregion
    }


}

